-- GENERATED SPELL FOR [Ghostly Steward] --


function spell0_16414(pUnit, Event) --@Drunken Skull Crack,n/a--
pUnit:FullCastSpellOnTarget(29690,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16414', 4308, 1)
end

function spell1_16414(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(29691,pUnit)
pUnit:RegisterEvent('Sorts_16414', 639, 1)
end

function Sorts_16414(pUnit, Event)
local choix_sorts_16414 = math.random(0, 1)
if choix_sorts_16414 == 0 then
pUnit:RegisterEvent('spell0_16414', 1, 1)
end
if choix_sorts_16414 == 1 then
pUnit:RegisterEvent('spell1_16414', 1, 1)
end
end

function mob16414_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16414', math.random(1500, 3000), 1)
end

function mob16414_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16414_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16414_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16414, 1, 'mob16414_Action')
RegisterUnitEvent(16414, 2, 'mob16414_Leave')
RegisterUnitEvent(16414, 3, 'mob16414_Kill')
RegisterUnitEvent(16414, 4, 'mob16414_Die')
